#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a, b, c,i;
	for (i = 100; i <=999 ;i++)
	{
		int a = i % 10;
		int b = (i / 10) % 10;
		int c = i / 100;
		if (i == a * a * a + b * b * b + c * c * c)
			printf("%d\n", i);

	}

	return 0;
}